package com.baijia.web.service;

import com.baijia.web.dto.response.MobileResponse;
import com.baijia.web.vo.BindPassportVO;
import com.baijia.web.vo.PassportRequestVO;
import com.baijia.web.vo.PasswordRequestVO;
import com.baijia.web.vo.ResetPasswordVO;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by dudu on 16/7/9.
 */
public interface IPassportValidateService {

    /**
     * 校验登录参数合法性
     * 
     * @param passportRequestVO
     * @param response
     * @return
     */
    boolean validateLoginParams(PassportRequestVO passportRequestVO, MobileResponse response);

    /**
     * 校验短信验证码参数合法性
     * 
     * @param username
     * @param code
     * @param response
     * @return
     */
    boolean validateSmsCode(String username, HttpServletRequest request, String code, MobileResponse response);

    /**
     * 校验手机短信登录
     * 
     * @param username
     * @param response
     * @return
     */
    boolean validateMobileLoginSms(String username, HttpServletRequest request, MobileResponse response);

    boolean validatePassword(PasswordRequestVO passwordRequestVO, MobileResponse response);

    boolean validateResetPassword(ResetPasswordVO resetPasswordVO, MobileResponse response);

    boolean validateBindPassportVo(BindPassportVO bindPassportVO, MobileResponse response, HttpServletRequest request);

    boolean validateCaptcha(HttpServletRequest request, MobileResponse<?> response);
}
